package com.ciquan.server.bean;

import com.ciquan.server.util.json.DateJsonSerializer;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import java.util.Date;

/**
 * Created by bjliwei2014 on 2015/2/27.
 */
public class WorksInfo {

    private Integer worksid;

    private Integer artistid;

    private String artistName;

    private Integer userid;

    private String username;

    private Integer cyear;

    private String guige;

    private Integer gongyi;

    private Integer qixing;

    private Integer state;

    private String name;

    private String intro;

    private String mainPicUrl;

    private String thumbPicUrl;

    private String xijiePics;

    @JsonSerialize(using = DateJsonSerializer.class)
    private Date ctime;

    @JsonSerialize(using = DateJsonSerializer.class)
    private Date mtime;

    public Integer getWorksid() {
        return worksid;
    }

    public void setWorksid(Integer worksid) {
        this.worksid = worksid;
    }

    public Integer getArtistid() {
        return artistid;
    }

    public void setArtistid(Integer artistid) {
        this.artistid = artistid;
    }

    public String getArtistName() {
        return artistName;
    }

    public void setArtistName(String artistName) {
        this.artistName = artistName;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getCyear() {
        return cyear;
    }

    public void setCyear(Integer cyear) {
        this.cyear = cyear;
    }

    public String getGuige() {
        return guige;
    }

    public void setGuige(String guige) {
        this.guige = guige;
    }

    public Integer getGongyi() {
        return gongyi;
    }

    public void setGongyi(Integer gongyi) {
        this.gongyi = gongyi;
    }

    public Integer getQixing() {
        return qixing;
    }

    public void setQixing(Integer qixing) {
        this.qixing = qixing;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getMainPicUrl() {
        return mainPicUrl;
    }

    public void setMainPicUrl(String mainPicUrl) {
        this.mainPicUrl = mainPicUrl;
        int index =mainPicUrl.lastIndexOf("/");
        this.thumbPicUrl = "http://182.92.107.35/uploads/pictures/" + this.mainPicUrl.substring(0, index) + "/200x200/" + this.mainPicUrl.substring(index + 1);
    }

    public String getThumbPicUrl() {
        return thumbPicUrl;
    }

    public void setThumbPicUrl(String thumbPicUrl) {
        this.thumbPicUrl = thumbPicUrl;
    }

    public String getXijiePics() {
        return xijiePics;
    }

    public void setXijiePics(String xijiePics) {
        this.xijiePics = xijiePics;
    }

    public Date getCtime() {
        return ctime;
    }

    public void setCtime(Date ctime) {
        this.ctime = ctime;
    }

    public Date getMtime() {
        return mtime;
    }

    public void setMtime(Date mtime) {
        this.mtime = mtime;
    }
}
